import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import monkey from "vite-plugin-monkey";
import Components from "unplugin-vue-components/vite";
import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    Components({
      resolvers: [
        AntDesignVueResolver({
          importStyle: false, // css in js
        }),
      ],
    }),
    vue(),
    monkey({
      entry: "src/main.ts",
      userscript: {
        name: "抖音直播自动化程序6",
        icon: "https://p3-ec.byteimg.com/tos-cn-i-ml95ezrrk7/douyin_round.7e214c51.png~tplv-ml95ezrrk7-resize:0:0:q75.image",
        namespace: "npm/vite-plugin-monkey",
        match: [
          "https://buyin.jinritemai.com/dashboard/live/control*",
          "https://ark.xiaohongshu.com/live_center_control*",
        ],
      },
    }),
  ],
});
